@extends('layouts.app')



@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel panel-default">
                <div class="panel-heading">Register</div>

                <div class="panel-body">

                    <form class="form-horizontal" method="POST" action="{{ route('register') }}">
                        {{ csrf_field() }}

                        <div class="form-group{{ $errors->has('phone') ? ' has-error' : '' }}">
                            <!-- 此处有验证部分 -->
                            <label for="name" class="col-md-4 control-label">手机号码</label>
                            <div class="col-md-6">
                                <input id="phone" type="text" class="form-control" name="phone" value="{{ old('phone') }}" required autofocus>

                                @if ($errors->has('phone'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('phone') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group{{ $errors->has('smscode') ? ' has-error' : '' }}" >
                            <label for="smscode" class="col-md-4 control-label">验证码</label>
                            <div class="col-md-4" >
                                <input id="smscode" type="text" class="form-control" name="smscode" value="{{ old('smscode') }}" required>

                                @if ($errors->has('smscode'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('smscode') }}</strong>
                                    </span>
                                @endif
                                
                            </div>
                            <div class="col-sd-1" >
                                <button type="button" class="btn btn-primary" id="sms">
                                    发送短信
                                </button>
                            </div>
                        </div>

                        <div class="form-group{{ $errors->has('invite_code') ? ' has-error' : '' }}">
                            <label for="invite_code" class="col-md-4 control-label">邀请码</label>
                            <div class="col-md-6">
                                <input id="invite_code" type="text" class="form-control" name="invite_code" value="{{ old('invite_code') }}" required>
                                @if ($errors->has('invite_code'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('invite_code') }}</strong>
                                    </span>
                                @endif

                            </div>

                                
                            
                        </div>

                        <div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
                            <label for="password" class="col-md-4 control-label">Password</label>

                            <div class="col-md-6">
                                <input id="password" type="password" class="form-control" name="password" required>

                                @if ($errors->has('password'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>

                            <div class="col-md-6">
                                <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-6 col-md-offset-4">
                                <button type="submit" class="btn btn-primary">
                                    Register
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

@endsection

